/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package srm;

/**
 *
 * @author Wei Chen <acee06.weichen@gmail.com>
 */
import java.util.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;


public class GogoXBallsAndBinsEasy
{
	public int solve(int[] T)
	{
        int sum = 0;
		for (int i = 0; i < T.length / 2; i++) {
            sum += T[T.length - 1 - i] - T[i];
        }
        
        return sum;
	}
}